﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebForm3 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DropDownList1.Items.Add("福建");
                DropDownList1.Items.Add("江西");
                
               
            }
        }
        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string province = DropDownList1.SelectedValue;
            DropDownList2.Items.Clear();

            if (province == "福建")
            {
                DropDownList2.Items.Add("龙岩");
                DropDownList2.Items.Add("厦门");
                DropDownList2.Items.Add("漳州");
            }
            else
            {
                DropDownList2.Items.Add("南昌");
                DropDownList2.Items.Add("鹰潭");
                DropDownList2.Items.Add("九江");
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Literal1.Text = $"姓名：{TextBox1.Text},性别：{RadioButtonList1.Text},籍贯：{DropDownList1.Text}{DropDownList2.Text}";
        }
    }
}